package itemPackage;

public abstract class AEquipment extends AItem {
	
	private String name, slotName;
	private String[] whichCastes;
	
	public String getName() {
		return name;
	}

	public String getSlotName() {
		return slotName;
	}

	public String[] getWhichCastes() {
		return whichCastes;
	}
	
	public boolean isEquippable (String caste, String slot)
	{
		boolean casteMatch = false;
		
		for(int i = 0; i < whichCastes.length; i++)
			if (caste.equals(whichCastes[i]))
				casteMatch = true;
		
		if(casteMatch == true)
			if(slot.equals(slotName))
				return true;
			else 
				if(slot.equals("acessorySlot1")||slot.equals("acessorySlot2"))
					return true;
			
		return false;
	}
}
